package day15;
import java.lang.Thread;
public class learn1 implements Runnable{
    @Override
    public void run() {
        for(int i=5;i<21;i+=3){
            System.out.println("年轻人爬完100米");
            if(i==14){
                System.out.println("年轻人到达终点");
            }
        }
        for(int j=8;j<55;j+=5){
            System.out.println("老年人爬完100米");
            if(j==23){
                System.out.println("老年人到达终点");
            }
        }

    }

    public static void main(String[] args) {
        System.out.println("**开始爬山***");
        learn1 th=new learn1();
        learn1 th1=new learn1();
        Thread thread=new Thread(th);
        Thread thread1=new Thread(th1);
        thread.start();
        thread1.start();
    }
}

